package com.zyicoding.myfactory.service.impl;

import com.zyicoding.myfactory.dao.WorkerMapper;
import com.zyicoding.myfactory.pojo.Worker;
import com.zyicoding.myfactory.service.WorkerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class WorkerServiceImpl implements WorkerService {
    @Autowired
    private WorkerMapper workerMapper;

    @Override
    public List<Worker> selectAllWorker() {
        return workerMapper.selectList(null);
    }

    @Override
    public Worker selectWorkerById(Integer id) {
        return workerMapper.selectById(id);
    }
}
